home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / arexx / ole1v10a.lha / OLE_System / rexx / BillGoldenGates.rexx next >
Encoding:
OS/2 REXX Batch file  |  1995-01-31  |  1.5 KB  |  82 lines

  1. /*
  2.  * BillGoldenGates.rexx
  3.  *
  4.  * USAGE: BillGoldenGates.rexx
  5.  *
  6.  * BillGoldenGates.rexx
  7.  *
  8.  * $(C): (1994, Rocco Coluccelli, Bologna)
  9.  * $VER: BillGoldenGates.rexx 1.01 (31.Jan.1995)
  10.  */
  11.  
  12. ADDRESS COMMAND
  13.  
  14. MAXLINE = 80
  15.  
  16. RUN '>NIL: Multiview 8svx/porta PORTNAME OLE_PLAY'
  17. RUN '>NIL: Multiview iff/BillGGates.remote PORTNAME OLE_REMOTE'
  18. ADDRESS OLE_PLAY WINDOWTOBACK
  19.  
  20. IF SHOW('P','OLE_DISPLAY') THEN
  21.     ADDRESS OLE_DISPLAY QUIT
  22.  
  23. s1 = "Bill Goldengates on line one,"
  24. CALL Print(s1 s1,)
  25. ''SAY '-r -s180 -p80' s1 s1
  26.  
  27. s1 = "Mr. Goldengates, would you please be so kind as to come in my"
  28. s2 = "Yes, boss! Just a moment 'cause I'm"
  29. s3 = "NOW!!!"
  30. s4 = "I'm coming right away, boss."
  31. CALL Print(s1 "office?",)
  32. ''SAY '-m -s140 -p120' s1 "offeece?"
  33. CALL Print(s2,)
  34. ''SAY '-f -s170 -p140' s2
  35. CALL Print(s3)
  36. ''SAY '-m -s70 -p65' s3
  37. CALL Print(s4,)
  38. ''SAY '-f -s200 -p180' s4
  39.  
  40. WAIT 1
  41. ADDRESS OLE_PLAY DOTRIGGERMETHOD "PLAY"
  42. WAIT 1
  43. ADDRESS OLE_REMOTE QUIT
  44. ADDRESS OLE_PLAY QUIT
  45.  
  46. s1 = "Here I am, boss, what can I do for you?"
  47. CALL Print(s1,)
  48. ''SAY '-f -s170 -p140' s1
  49.  
  50. ECHO "TO BE CONTINUED..."
  51. WAIT 2
  52.  
  53. EXIT 0
  54.  
  55.  
  56. /*
  57.  *    procedure to split text onto lines of MAXLINE characters length
  58.  */
  59. Print: PROCEDURE EXPOSE MAXLINE
  60.  
  61.     DO i = 1 TO ARG()
  62.  
  63.         line = ARG(i)
  64.         DO FOREVER
  65.  
  66.             IF LENGTH(line) <= MAXLINE THEN DO
  67.                 ECHO line
  68.                 LEAVE
  69.                 END
  70.  
  71.             pos = MAX(LASTPOS(' ',line,MAXLINE),POS(' ',line))
  72.             IF pos = 0 THEN DO
  73.                 ECHO line
  74.                 LEAVE
  75.                 END
  76.  
  77.             ECHO LEFT(line,pos); line = SUBSTR(line,pos + 1)
  78.         END
  79.     END
  80.  
  81. RETURN
  82.